//
//  HomeViw.swift
//  SwiftUI_App
//
//  Created by qingzhou on 2021/6/22.
//

import SwiftUI

struct HomeViw: View {
    
    /// viewModel
    private let homeViewModel:HomeViewModel = HomeViewModel()
    
    ///导航栏标题
    var title: String
    
    var body: some View {
        
            ScrollView(showsIndicators: false, content: {
                
                SearchToolView()
                
                SegmentView(segments: ["12","13","14","15","16","17","18",],currentTab: "15")
                
                ///banner 视图
                BannerView()
                    .environmentObject(homeViewModel)
            })
        
    }
    
}

struct HomeViw_Previews: PreviewProvider {
    static var previews: some View {
        HomeViw(title: "首页")
    }
}
